@extends('manage.layout')

@section('content')
    <section class="content-header">
        <h1>
            项目详情
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
            <li><a href="#">Project</a></li>
            <li class="active">Project Details</li>
        </ol>
    </section>

    <!-- Main content -->
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-header">
                        <h3 class="box-title">内容</h3>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body" style="text-align: center">
                        <table class="table table-bordered table-hover">
                            <tr>
                                <td style="width: 30%">项目名称</td>
                                <td >{{ $project['name'] }}</td>
                            </tr>
                            <tr>
                                <td>来源编号</td>
                                <td>{{ $project['origin_id'] }}</td>
                            </tr>
                            <tr>
                                <td>客户</td>
                                <td>{{ App\Model\Client::find($project['client_id'])['first_name'] }}</td>
                            </tr>
                            <tr>
                                <td>意向产品</td>
                                <td>{{ $project['product_id'] }}</td>
                            </tr>
                            {{--<tr>--}}
                                {{--<td>状态</td>--}}
                                {{--<td></td>--}}
                            {{--</tr>--}}
                            <tr>
                                <td>等级</td>
                                <td>{{ $grade[$project['grade']] }}</td>
                            </tr>
                            <tr>
                                <td>外部来源</td>
                                <td>{{ $origin[$project['origin']] }}</td>
                            </tr>
                            <tr>
                                <td>阶段</td>
                                <td>{{ $stage[$project['stage']] }}</td>
                            </tr>
                            <tr>
                                <td>预估报价</td>
                                <td>{{ $project['future_price'] }}元</td>
                            </tr>
                            <tr>
                                <td>客户报价</td>
                                <td>{{ $project['client_price'] }}元</td>
                            </tr>
                            <tr>
                                <td>下次拜访时间</td>
                                <td>{{ $project['next_visit'] }}</td>
                            </tr>
                            <tr>
                                <td>项目详情</td>
                                <td>{{ $project['details'] }}</td>
                            </tr>
                            <tr>
                                <td>图片</td>
                                {{--<td>@foreach($pic as $p)<img src="http://vipyipoint.oss-cn-beijing.aliyuncs.com/{{ $p }}" width="100px" height="100px" style="margin-right: 10px">@endforeach</td>--}}
                                <td>
                                    <div id="md" class="md-trigger" style="width:100%;height:100px;margin: auto">
                                        @foreach($pic as $k=>$v)
                                            <img layer-src="http://vipyipoint.oss-cn-beijing.aliyuncs.com/{{ $v }}" src="http://vipyipoint.oss-cn-beijing.aliyuncs.com/{{ $v }}" width="100px" height="100px" style="margin-right: 10px">
                                        @endforeach
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td>附件</td>
                                <td>@foreach($file as $f)<a href="http://vipyipoint.oss-cn-beijing.aliyuncs.com/{{ $f }}">{{ substr(preg_replace('/.*\//','',$f),14) }}<br /></a>@endforeach</td>
                            </tr>
                        </table>
                        {{--标题：{{ $share->title }}<br />--}}
                        {{--创建时间：{{ $share->update_time }}<br />--}}
                        {{--作者：{{ $share->dd_id }}<br />--}}
                        {{--内容：{{ $share->content }}<br />--}}
                        {{--附件：<br />@foreach($share->att as $value){{ substr(preg_replace('/.*\//','',$value),14) }}<br />@endforeach--}}
                    </div>
                </div>
            </div>
            <!-- /.col -->
        </div>
        <!-- /.row -->
    </section>
@stop

@section('script')
    <script>
        layer.photos({
            photos: "#md"
            ,anim: 5 //0-6的选择，指定弹出图片动画类型，默认随机（请注意，3.0之前的版本用shift参数）
        });
    </script>
@stop